<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Valera
 * Date: 28.05.11
 * Time: 5:29
 * To change this template use File | Settings | File Templates.
 */
class Api_Row_Profession extends Api_Row_Base
{
    private $__page = NULL;

    public function Name()
    {
        return $this->name;
    }

    public function Plurality()
    {
        return $this->plurality;
    }

    public function FilterUrl()
    {
        return $this->_assemble(
            array(
                 'controller' => 'author',
                 'action' => 'index',
                 'prof' => $this->id
            ),
            NULL,
            TRUE
        );
    }

    public function NavigationPage()
    {
        if (NULL === $this->__page) {
            $this->__page = new Zend_Navigation_Page_Mvc(
                array(
                	 'id' => $this->id,
                     'label' => $this->Plurality(),
                     'controller' => 'author',
                     'action' => 'index',
                     'params' => array('prof' => $this->id)
                )
            );
        }
        return $this->__page;
    }
}
